
#include <LengthUnit.h>
#include <stdio.h>

const UINT RATIO_MILE_TO_BASE = 63360;
const UINT RATIO_YARD_TO_BASE = 36;
const UINT RATIO_FEET_TO_BASE = 12;
const UINT RATIO_INCH_TO_BASE = 1;

LengthUnit::LengthUnit(UINT factorToBase):Unit(factorToBase)
{
}
LengthUnit& LengthUnit::getBaseUnit()
{
	return getInchUnit();
}
LengthUnit& LengthUnit::getYardUnit()
{
	static LengthUnit theYard(RATIO_YARD_TO_BASE);
	
	return theYard;
}
LengthUnit& LengthUnit::getMileUnit()
{
	static LengthUnit theMile(RATIO_MILE_TO_BASE);
	
	return theMile;
}
LengthUnit& LengthUnit::getFeetUnit()
{
	static LengthUnit theFeet(RATIO_FEET_TO_BASE);
	
	return theFeet;
}

LengthUnit& LengthUnit::getInchUnit()
{
	static LengthUnit theInch(RATIO_INCH_TO_BASE);
	
	return theInch;
}




